home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / MATH / NRPAS13 / BESSY1.DEM < prev    next >
Text File  |  1991-04-29  |  552b  |  26 lines

  1. PROGRAM d6r18(input,output,dfile);
  2. (* driver for routine BESSY1 *)
  3. VAR
  4.    i,nval : integer;
  5.    val,x : real;
  6.    txt : string[18];
  7.    dfile : text;
  8.  
  9. (*$I MODFILE.PAS *)
  10. (*$I BESSJ1.PAS *)
  11.  
  12. (*$I BESSY1.PAS *)
  13.  
  14. BEGIN
  15.    glopen(dfile,'fncval.dat');
  16.    REPEAT readln(dfile,txt) UNTIL (txt = 'Bessel Function Y1');
  17.    readln(dfile,nval);
  18.    writeln(txt);
  19.    writeln('x':5,'actual':12,'bessy1(x)':13);
  20.    FOR i := 1 to nval DO BEGIN
  21.       readln(dfile,x,val);
  22.       writeln(x:6:2,val:12:7,bessy1(x):12:7)
  23.    END;
  24.    close(dfile)
  25. END.
  26.